package com.hsgene.order.constants.v1;

import org.apache.xmlbeans.impl.xb.xsdschema.Public;

import java.util.Arrays;

/**
 * @Description: //检测目的
 * @ProjectName: hdas-geneshop-server
 * @Package: com.hsgene.order.constants.v1
 * @Author: FX
 * @CreateDate: 2019/1/11 16:23
 * @Version: 1.0
 * Copyright: Copyright (c) 2019
 */
public enum TestPurposeType {
    /**
     * 肿瘤治疗用药
     */
   THERAPEUTIC_MEDICATION("2","肿瘤治疗用药"),
    RISK_PREVENTION("1","肿瘤风险预防"),
    AUXILIARY_DIAGNOSIS("3","辅助诊断"),
   UNDEFINED("-1","后台暂未定义的检测目的");
   private String code;
   private String desc;

   public static TestPurposeType  getEnmu(String code){
       for (TestPurposeType c : values()) {
         if(code.equals(c.getCode())){
             return c;
         }
       }
       return UNDEFINED;
   }

    TestPurposeType(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }}
